package com.aoip.telemetry.telemetry.datastorage.mapper;

import com.aoip.telemetry.telemetry.entity.common.MergeTableDataEntity;
import com.aoip.telemetry.telemetry.entity.common.TableDataEntity;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 元素数据持久化到数据库
 *
 * @author chenbai
 * @version 1.0
 * @date 2021/8/11 15:06
 */
@Mapper
@DS("monitorData")
public interface ElementDataPersistenceMapper {

    /**
     * 业务数据持久化到MySQL数据，一个报文中的多条数据，批量新增
     *
     * @author chenbai
     * @date 2021/10/5
     **/
    void mysqlSave(List<TableDataEntity> entityList);



    /**
     * 业务数据持久化到MySQL数据，一个报文中的多条数据，单条数据新增
     * @author chenbai
     * @date 2021/11/16
     **/
    @Deprecated
    void mysqlSave(Map<String, Object> map);

    void mysqlUpdate(MergeTableDataEntity entity);

    List<Object> mysqlQuery(MergeTableDataEntity entity);
}
